<script setup lang="ts">

import {computed} from "vue";

const props = defineProps<{
  icon: string,
  size?: number,
  color?: string
}>()

const icon_class = computed(() => {
  return `icon-${props.icon}`
})
const icon_style = computed(() => {
  let size = props.size || 25
  let color = props.color || 'inherit'
  return {
    'font-size': `${size}px`,
    color: color
  }
})
</script>

<template>
  <span class="iconfont" :class="icon_class" :style="icon_style"></span>
</template>

<style scoped>

</style>